﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MarpelPharma.BarcodeClasses;

namespace MarpelPharma.Ajustes
{
    public partial class AjusteNegativo : Form
    {
        public AjusteNegativo()
        {
            InitializeComponent();

            //////////////////////////////////////////////////////////////////////////////
            //Set the property of the form so it can read barcodes even if the textbox doesn't have focus
            KeyPreview = true;
            //Register the events to be raised on the child control
            KeyUp += new KeyEventHandler(this.barcodeUserControl.BarcodeReaderControl_KeyUp);
            KeyPress += new KeyPressEventHandler(this.barcodeUserControl.BarcodeReaderControl_KeyPress);
            this.barcodeUserControl.BarcodeExecuted += new EventHandler(BarcodeExecuted_Method);
            //////////////////////////////////////////////////////////////////////////////
        }

        /// <summary>
        /// Event that is raised after the webservice is call and the BarcodeObject is created
        /// </summary>
        /// <param name="sender">Parameter that contains the reference to the control that raised the vent</param>
        /// <param name="e">Parameter that contains the event data</param>
        public void BarcodeExecuted_Method(object sender, EventArgs e)
        {

            Barcode objBarcode = barcodeUserControl.BarcodeObject;
        }


        private void menuExit_Click(object sender, EventArgs e)
        {
            this.Close();  
        }
    }
}